// This is used for convolution logging. Also see
// tensorflow/core/protobuf/autotuing.h
syntax = "proto3";

package tensorflow;

import "tensorflow/compiler/xla/stream_executor/dnn.proto";

option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";

// A convolution. Currently it's only used for logging. In the future, we may
// want to use it in the API as well.
message ConvolutionProto {
  stream_executor.dnn.ConvolutionKind kind = 1;
  stream_executor.dnn.TensorDescriptorProto input = 2;
  stream_executor.dnn.TensorDescriptorProto filter = 3;
  stream_executor.dnn.TensorDescriptorProto output = 4;
  stream_executor.dnn.ConvolutionDescriptorProto conv_desc = 5;

  // result = conv_scale * conv(...) + side_value_scale * side_value.
  // side_value is an arbitrary buffer if activation is not none. Otherwise, it
  // has to be the result buffer (using its old values).
  double conv_scale = 6;
  double side_value_scale = 7;

  stream_executor.dnn.ActivationMode activation = 8;

  int64 input_address = 9;
  int64 filter_address = 10;
  int64 output_address = 11;
  int64 bias_address = 12;
  int64 side_input_address = 13;
}

message MatmulProto {
  stream_executor.dnn.DataType ab_dtype = 1;
  stream_executor.dnn.DataType c_dtype = 2;

  bool trans_a = 3;
  bool trans_b = 4;
  uint64 m = 5;
  uint64 n = 6;
  uint64 k = 7;
  int64 lda = 8;
  int64 ldb = 9;
  int64 ldc = 10;

  stream_executor.dnn.ActivationMode activation = 11;

  int64 a_address = 12;
  int64 b_address = 13;
  int64 c_address = 14;
  int64 bias_address = 15;
}
